Design by Contract with JML

نویسندگان

  • Gary T. Leavens
  • Yoonsik Cheon
چکیده

This document gives a tutorial introduction to the Java Modeling Language (JML), and explains how JML can be used as a powerful design by contract (DBC) tool for Java. JML is a formal behavioral interface specification language for Java that contains the essential notations used in DBC as a subset. The basic concepts of DBC are explained with a particular emphasis on how to use JML notations to specify Java classes and interfaces. JML tools such as JML compiler (jmlc) are also introduced, with examples of their use.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Checking JML Specification Soundness Using ESC/Java2

This report describes the work completed in the Final Year Project “Checking JML Specification Soundness Using ESC/Java2.” It introduces some of the basics of Design by Contract and the Java Modelling Language (JML). This paper primarily deals with the Extended Static Checker ESC/Java2, one of the many powerful tools that understand JML. It describes techniques for extending the functionality o...

متن کامل

A Logic for the Java Modeling Language JML

This paper describes a specialised logic for proving specifications in the Java Modeling Language (JML). JML is an interface specification language for Java. It allows assertions like invariants, constraints, preand post-conditions, and modifiable clauses as annotations to Java classes, in a design-by-contract style. Within the LOOP project at the University of Nijmegen JML is used for specific...

متن کامل

A Catalog of Bad Smells in Design-by-Contract Methodologies with Java Modeling Language

Bad smells are usually related to program source code, arising from bad design and programming practices. Refactoring activities are often motivated by the detection of bad smells. With the increasing adoption of Design-by-Contract (DBC) methodologies in formal software development, evidence of bad design practices can similarly be found in programs that combine actual production code with inte...

متن کامل

On the Implementation of @pre

The paradigm of design by contract provides a transparent way of specifying object-oriented systems. There exist a number of languages for contractual specification including OCL, JML and Spec#. Nevertheless, there are still a number of research problems concerning this approach. One of them is the implementation of primitive @pre in OCL or equivalently old in JML. Those primitives are used in ...

متن کامل

Validating Safety for the Integrated Services of the Home Network System Using JML

The home network system (HNS, for short) enables the flexible integration of networked home appliances, which achieves value-added integrated services. Assuring safety within such integrated services is a crucial issue to guarantee a high quality of life in smart home. In this paper, we present a novel framework for the safety of the HNS integrated services. We first propose a way to define saf...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2003